#include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
	int n;
	while (cin >> n)
	{
		if (n / 10000 == n % 10 && (n / 1000) % 10 == (n % 100) / 10)cout << "Yes" << endl;
		else cout << "No" << endl;
	}
	return 0;
}